
**********CLEAN STUDY 1 DATA***************

***Drop Respondents that Failed Attention Check (80% passed)
keep if disposition1_4=="Neither agree nor disagree"

***SexismOrder (1 = Pre-Treatment; 0 = Post-Treatment)
gen SexismOrder = 0
replace SexismOrder = 1 if sexismorder==1
drop sexismorder
 
***Hostile Sexism (1 = Least Sexist; 6 = Most Sexist)
gen hostsexism1 = .
replace hostsexism1 = 1 if sexism1_before1_1=="Strongly agree" | sexismpost11_1=="Strongly agree"
replace hostsexism1 = 2 if sexism1_before1_1=="Agree" | sexismpost11_1=="Agree"
replace hostsexism1 = 3 if sexism1_before1_1=="Somewhat agree" | sexismpost11_1=="Somewhat agree"
replace hostsexism1 = 4 if sexism1_before1_1=="Somewhat disagree" | sexismpost11_1=="Somewhat disagree"
replace hostsexism1 = 5 if sexism1_before1_1=="Disagree" | sexismpost11_1=="Disagree"
replace hostsexism1 = 6 if sexism1_before1_1=="Strongly disagree" | sexismpost11_1=="Strongly disagree"

gen hostsexism2 = .
replace hostsexism2 = 1 if sexism1_before1_2=="Strongly agree" | sexismpost11_2=="Strongly agree"
replace hostsexism2 = 2 if sexism1_before1_2=="Agree" | sexismpost11_2=="Agree"
replace hostsexism2 = 3 if sexism1_before1_2=="Somewhat agree" | sexismpost11_2=="Somewhat agree"
replace hostsexism2 = 4 if sexism1_before1_2=="Somewhat disagree" | sexismpost11_2=="Somewhat disagree"
replace hostsexism2 = 5 if sexism1_before1_2=="Disagree" | sexismpost11_2=="Disagree"
replace hostsexism2 = 6 if sexism1_before1_2=="Strongly disagree" | sexismpost11_2=="Strongly disagree"

gen hostsexism3 = .
replace hostsexism3 = 6 if sexism1_before1_3=="Strongly agree" | sexismpost11_3=="Strongly agree"
replace hostsexism3 = 5 if sexism1_before1_3=="Agree" | sexismpost11_3=="Agree"
replace hostsexism3 = 4 if sexism1_before1_3=="Somewhat agree" | sexismpost11_3=="Somewhat agree"
replace hostsexism3 = 3 if sexism1_before1_3=="Somewhat disagree" | sexismpost11_3=="Somewhat disagree"
replace hostsexism3 = 2 if sexism1_before1_3=="Disagree" | sexismpost11_3=="Disagree"
replace hostsexism3 = 1 if sexism1_before1_3=="Strongly disagree" | sexismpost11_3=="Strongly disagree"

gen hostsexism4 = .
replace hostsexism4 = 6 if sexism1_before1_4=="Strongly agree" | sexismpost11_4=="Strongly agree"
replace hostsexism4 = 5 if sexism1_before1_4=="Agree" | sexismpost11_4=="Agree"
replace hostsexism4 = 4 if sexism1_before1_4=="Somewhat agree" | sexismpost11_4=="Somewhat agree"
replace hostsexism4 = 3 if sexism1_before1_4=="Somewhat disagree" | sexismpost11_4=="Somewhat disagree"
replace hostsexism4 = 2 if sexism1_before1_4=="Disagree" | sexismpost11_4=="Disagree"
replace hostsexism4 = 1 if sexism1_before1_4=="Strongly disagree" | sexismpost11_4=="Strongly disagree"

gen hostsexism = (hostsexism1 + hostsexism2 + hostsexism3 + hostsexism4) / 4

summarize hostsexism, detail 

gen hostsexismIQR = .
replace hostsexismIQR = 0 if hostsexism<=2.25
replace hostsexismIQR = 1 if hostsexism>=3.5
replace hostsexismIQR = . if hostsexism==.


***Benevolent Sexism (1 = Least Sexist; 6 = Most Sexist)
*Note: Questions 3 and 4 are negatively correlated with 1 and 2
gen benevsexism1 = .
replace benevsexism1= 6 if sexism1_before1_5=="Strongly agree" | sexismpost11_5=="Strongly agree"
replace benevsexism1= 5 if sexism1_before1_5=="Agree" | sexismpost11_5=="Agree"
replace benevsexism1 = 4 if sexism1_before1_5=="Somewhat agree" | sexismpost11_5=="Somewhat agree"
replace benevsexism1 = 3 if sexism1_before1_5=="Somewhat disagree" | sexismpost11_5=="Somewhat disagree"
replace benevsexism1 = 2 if sexism1_before1_5=="Disagree" | sexismpost11_5=="Disagree"
replace benevsexism1 = 1 if sexism1_before1_5=="Strongly disagree" | sexismpost11_5=="Strongly disagree"

gen benevsexism2 = .
replace benevsexism2= 6 if sexism2_before1_1=="Strongly agree" | sexismpost21_1=="Strongly agree"
replace benevsexism2= 5 if sexism2_before1_1=="Agree" | sexismpost21_1=="Agree"
replace benevsexism2 = 4 if sexism2_before1_1=="Somewhat agree" | sexismpost21_1=="Somewhat agree"
replace benevsexism2 = 3 if sexism2_before1_1=="Somewhat disagree" | sexismpost21_1=="Somewhat disagree"
replace benevsexism2 = 2 if sexism2_before1_1=="Disagree" | sexismpost21_1=="Disagree"
replace benevsexism2 = 1 if sexism2_before1_1=="Strongly disagree" | sexismpost21_1=="Strongly disagree"

gen benevsexism3 = .
replace benevsexism3= 1 if sexism2_before1_2=="Strongly agree" | sexismpost21_2=="Strongly agree"
replace benevsexism3= 2 if sexism2_before1_2=="Agree" | sexismpost21_2=="Agree"
replace benevsexism3 = 3 if sexism2_before1_2=="Somewhat agree" | sexismpost21_2=="Somewhat agree"
replace benevsexism3 = 4 if sexism2_before1_2=="Somewhat disagree" | sexismpost21_2=="Somewhat disagree"
replace benevsexism3 = 5 if sexism2_before1_2=="Disagree" | sexismpost21_2=="Disagree"
replace benevsexism3 = 6 if sexism2_before1_2=="Strongly disagree" | sexismpost21_2=="Strongly disagree"

gen benevsexism4 = .
replace benevsexism4= 1 if sexism2_before1_3=="Strongly agree" | sexismpost21_3=="Strongly agree"
replace benevsexism4= 2 if sexism2_before1_3=="Agree" | sexismpost21_3=="Agree"
replace benevsexism4 = 3 if sexism2_before1_3=="Somewhat agree" | sexismpost21_3=="Somewhat agree"
replace benevsexism4 = 4 if sexism2_before1_3=="Somewhat disagree" | sexismpost21_3=="Somewhat disagree"
replace benevsexism4 = 5 if sexism2_before1_3=="Disagree" | sexismpost21_3=="Disagree"
replace benevsexism4 = 6 if sexism2_before1_3=="Strongly disagree" | sexismpost21_3=="Strongly disagree"

*Since items 3 and 4 are negatively correlated with 1 and 2 going to drop the latter two from the index. Yields a greater reliability measure than reverse coding 3 and 4
gen benevsexism = (benevsexism1 + benevsexism2) / 2

summarize benevsexism, detail


gen benevsexismIQR = .
replace benevsexismIQR = 0 if benevsexism<=2.5
replace benevsexismIQR = 1 if benevsexism>=4
replace benevsexismIQR = . if benevsexism==.


***Second Order Sexism (1 = Least Sexist; 6 = Most Sexist)
gen secordersexism_amer_citz = .
replace secordersexism_amer_citz = 6 if sexism2_before1_4=="Strongly agree" | sexismpost21_4=="Strongly agree"
replace secordersexism_amer_citz = 5 if sexism2_before1_4=="Agree" | sexismpost21_4=="Agree"
replace secordersexism_amer_citz = 4 if sexism2_before1_4=="Somewhat agree" | sexismpost21_4=="Somewhat agree"
replace secordersexism_amer_citz = 3 if sexism2_before1_4=="Somewhat disagree" | sexismpost21_4=="Somewhat disagree"
replace secordersexism_amer_citz = 2 if sexism2_before1_4=="Disagree" | sexismpost21_4=="Disagree"
replace secordersexism_amer_citz = 1 if sexism2_before1_4=="Strongly disagree" | sexismpost21_4=="Strongly disagree"

gen secordersexism_for_lead = .
replace secordersexism_for_lead = 6 if sexism2_before1_5=="Strongly agree" | sexismpost21_5=="Strongly agree"
replace secordersexism_for_lead = 5 if sexism2_before1_5=="Agree" | sexismpost21_5=="Agree"
replace secordersexism_for_lead = 4 if sexism2_before1_5=="Somewhat agree" | sexismpost21_5=="Somewhat agree"
replace secordersexism_for_lead = 3 if sexism2_before1_5=="Somewhat disagree" | sexismpost21_5=="Somewhat disagree"
replace secordersexism_for_lead = 2 if sexism2_before1_5=="Disagree" | sexismpost21_5=="Disagree"
replace secordersexism_for_lead = 1 if sexism2_before1_5=="Strongly disagree" | sexismpost21_5=="Strongly disagree"

gen secordersexism = (secordersexism_amer_citz + secordersexism_for_lead) / 2 

gen secordersexismIQR = .
replace secordersexismIQR = 0 if secordersexism<=3.5
replace secordersexismIQR = 1 if secordersexism>=4.5
replace secordersexismIQR = . if secordersexism==.


***Militant Assertiveness (1 = Least Hawkish; 6 = Most Hawkish)
gen hawkish1 = .
replace hawkish1 = 5 if disposition1_1=="Strongly agree" 
replace hawkish1 = 4 if disposition1_1=="Somewhat agree" 
replace hawkish1 = 3 if disposition1_1=="Neither agree nor disagree" 
replace hawkish1 = 2 if disposition1_1=="Somewhat disagree" 
replace hawkish1 = 1 if disposition1_1=="Strongly disagree"

gen hawkish2 = .
replace hawkish2 = 5 if disposition1_2=="Strongly agree" 
replace hawkish2 = 4 if disposition1_2=="Somewhat agree" 
replace hawkish2 = 3 if disposition1_2=="Neither agree nor disagree" 
replace hawkish2 = 2 if disposition1_2=="Somewhat disagree" 
replace hawkish2 = 1 if disposition1_2=="Strongly disagree"

gen hawkish3 = .
replace hawkish3 = 1 if disposition1_3=="Strongly agree" 
replace hawkish3 = 2 if disposition1_3=="Somewhat agree" 
replace hawkish3 = 3 if disposition1_3=="Neither agree nor disagree" 
replace hawkish3 = 4 if disposition1_3=="Somewhat disagree" 
replace hawkish3 = 5 if disposition1_3=="Strongly disagree"

gen hawkish = (hawkish1 + hawkish2 + hawkish3) / 3

summarize hawkish, detail 

gen hawkishIQR = .
replace hawkishIQR = 0 if hawkish<=2.7
replace hawkishIQR = 1 if hawkish>=3.6
replace hawkishIQR = . if hawkish==.


*Political ID (1 = Most Democrat; 6 = Most Republican)
gen political_identfication = 1
replace political_identfication = 2 if political_party==2
replace political_identfication = 3 if political_party==3 | political_party==6
replace political_identfication = 4 if political_party==4 | political_party==7
replace political_identfication = 5 if political_party==8 | political_party==5
replace political_identfication = 6 if political_party==9
replace political_identfication = 7 if political_party==10

gen democratic_respondent = 0
replace democratic_respondent = 1 if political_identfication<=3

gen republican_respondent = 0
replace republican_respondent = 1 if political_identfication>=5

***Code Education (1 = Least; 8 = Most; Drop Missing)
replace education = . if education==-3105 | education==-10

summarize education, detail

gen educationIQR = .
replace educationIQR = 0 if education<=2
replace educationIQR = 1 if education>=6
replace educationIQR = . if education==.


***Code Binary Ethnicity Variables
gen white = 0
replace white = 1 if ethnicity==1

gen black = 0
replace black = 1 if ethnicity==2

gen ethnicity_other = 0
replace ethnicity_other = 1 if white==0 & black==0


***Code Female Respondent Dummy
gen female_respondent = 0
replace female_respondent = 1 if gender==2


***Code Income (1 = Least; 24 = Most; Drop Missing)
gen income = hhi
replace income = . if hhi==-3105


***Code Binary Hispanic Variable 
gen hispanic_binary = 1
replace hispanic_binary = 0 if hispanic==1 | hispanic==15  | hispanic==16 


***Code Binary South Variable
gen south = 0
replace south = 1 if region==3


***Code Treatment Variables 
rename male male_name
rename female female_name

gen female = 0
replace female = 1 if cond9_dv!="" | cond10_dv!="" | cond13_dv!="" | cond14_dv!=""

gen male = 0
replace male = 1 if cond1_dv!="" | cond2_dv!="" | cond5_dv!="" | cond6_dv!="" 

gen statusquo = 0
replace statusquo = 1 if cond1_dv!="" | cond5_dv!="" | cond9_dv!="" | cond13_dv!="" 

gen conciliatory = 0
replace conciliatory = 1 if cond2_dv!="" | cond6_dv!="" | cond10_dv!="" | cond14_dv!="" 

gen democrat = 0
replace democrat = 1 if cond5_dv!="" | cond6_dv!="" | cond13_dv!="" | cond14_dv!="" 

gen republican = 0
replace republican = 1 if cond1_dv!="" | cond2_dv!="" | cond9_dv!="" | cond10_dv!="" 

gen femsq = 0
replace femsq = 1 if female==1 & statusquo==1

gen malesq = 0
replace malesq = 1 if male==1 & statusquo==1

gen maleconc = 0
replace maleconc= 1 if male==1 & conciliatory==1

gen femconc = 0
replace femconc= 1 if female==1 & conciliatory==1

gen demsq = 0
replace demsq = 1 if democrat==1 & statusquo==1

gen repsq = 0
replace repsq = 1 if republican==1 & statusquo==1

gen demconc = 0
replace demconc = 1 if democrat==1 & conciliatory==1

gen repconc = 0
replace repconc = 1 if republican==1 & conciliatory==1

gen femsq_in = 0
replace femsq_in = 1 if (femsq==1 & democratic_respondent==1 & democrat==1) | (femsq==1 & republican_respondent==1 & republican==1)

gen femconc_in = 0
replace femconc_in = 1 if (femconc==1 & democratic_respondent==1 & democrat==1) | (femconc==1 & republican_respondent==1 & republican==1)

gen malesq_in = 0
replace malesq_in = 1 if (malesq==1 & democratic_respondent==1 & democrat==1) | (malesq==1 & republican_respondent==1 & republican==1)

gen maleconc_in = 0
replace maleconc_in = 1 if (maleconc==1 & democratic_respondent==1 & democrat==1) | (maleconc==1 & republican_respondent==1 & republican==1)

gen femsq_out = 0
replace femsq_out = 1 if (femsq==1 & democratic_respondent==1 & republican==1) | (femsq==1 & republican_respondent==1 & democrat==1)

gen femconc_out = 0
replace femconc_out = 1 if (femconc==1 & democratic_respondent==1 & republican==1) | (femconc==1 & republican_respondent==1 & democrat==1)

gen malesq_out = 0
replace malesq_out = 1 if (malesq==1 & democratic_respondent==1 & republican==1) | (malesq==1 & republican_respondent==1 & democrat==1)

gen maleconc_out = 0
replace maleconc_out = 1 if (maleconc==1 & democratic_respondent==1 & republican==1) | (maleconc==1 & republican_respondent==1 & democrat==1)

gen in_partisan = 0
replace in_partisan = 1 if (democratic_respondent==1 & democrat==1) | (republican_respondent==1 & republican==1)

gen out_partisan = 0
replace out_partisan = 1 if (democratic_respondent==1 & republican==1) | (republican_respondent==1 & democrat==1)



***Code Full Disapproval Variable 1 (1 = Strongly Approve; 7 = Strongly Disapprove)
gen disapproval1 = .
replace disapproval1 = 1 if cond1_dv=="Strongly approve" | cond2_dv=="Strongly approve" | cond5_dv=="Strongly approve" | cond6_dv=="Strongly approve" | cond9_dv=="Strongly approve" | cond10_dv=="Strongly approve" | cond13_dv=="Strongly approve" | cond14_dv=="Strongly approve" 
replace disapproval1 = 2 if cond1_dv=="Approve" | cond2_dv=="Approve" | cond5_dv=="Approve" | cond6_dv=="Approve" | cond9_dv=="Approve" | cond10_dv=="Approve" | cond13_dv=="Approve" | cond14_dv=="Approve" 
replace disapproval1 = 3 if cond1_dv=="Somewhat approve" | cond2_dv=="Somewhat approve" | cond5_dv=="Somewhat approve" | cond6_dv=="Somewhat approve" | cond9_dv=="Somewhat approve" | cond10_dv=="Somewhat approve" | cond13_dv=="Somewhat approve" | cond14_dv=="Somewhat approve" 
replace disapproval1 = 4 if cond1_dv=="Neither approve nor disapprove" | cond2_dv=="Neither approve nor disapprove" | cond5_dv=="Neither approve nor disapprove" | cond6_dv=="Neither approve nor disapprove" | cond9_dv=="Neither approve nor disapprove" | cond10_dv=="Neither approve nor disapprove" | cond13_dv=="Neither approve nor disapprove" | cond14_dv=="Neither approve nor disapprove" 
replace disapproval1 = 5 if cond1_dv=="Somewhat disapprove" | cond2_dv=="Somewhat disapprove" | cond5_dv=="Somewhat disapprove" | cond6_dv=="Somewhat disapprove" | cond9_dv=="Somewhat disapprove" | cond10_dv=="Somewhat disapprove" | cond13_dv=="Somewhat disapprove" | cond14_dv=="Somewhat disapprove" 
replace disapproval1 = 6 if cond1_dv=="Disapprove" | cond2_dv=="Disapproving" | cond5_dv=="Disapprove" | cond6_dv=="Disapprove" | cond9_dv=="Disapprove" | cond10_dv=="Disapprove" | cond13_dv=="Disapproving" | cond14_dv=="Disapprove" 
replace disapproval1 = 7 if cond1_dv=="Strongly disapprove" | cond2_dv=="Strongly disapprove" | cond5_dv=="Strongly disapprove" | cond6_dv=="Strongly disapprove" | cond9_dv=="Strongly disapprove" | cond10_dv=="Strongly disapprove" | cond13_dv=="Strongly disapprove" | cond14_dv=="Strongly disapprove" 


***Code Binart Disapproval Variable 1 (1 = Disapprove; 0 = Don't Disapprove)
gen disapproval1_binary = 0
replace disapproval1_binary = 1 if disapproval1>=5
replace disapproval1_binary = . if disapproval1==.


***Code Full Disapproval Variable 2 (1 = Strongly Approve; 7 = Strongly Disapprove)
gen disapproval2 = .
replace disapproval2 = 1 if cond1_outcome_dv=="Strongly approve" | cond2_outcome_dv=="Strongly approve" | cond5_outcome_dv=="Strongly approve" | cond6_outcome_dv=="Strongly approve" | cond9_outcome_dv=="Strongly approve" | cond10_outcome_dv=="Strongly approve" | cond13_outcome_dv=="Strongly approve" | cond14_outcome_dv=="Strongly approve" 
replace disapproval2 = 2 if cond1_outcome_dv=="Approve" | cond2_outcome_dv=="Approve" | cond5_outcome_dv=="Approve" | cond6_outcome_dv=="Approve" | cond9_outcome_dv=="Approve" | cond10_outcome_dv=="Approve" | cond13_outcome_dv=="Approve" | cond14_outcome_dv=="Approve" 
replace disapproval2 = 3 if cond1_outcome_dv=="Somewhat approve" | cond2_outcome_dv=="Somewhat approve" | cond5_outcome_dv=="Somewhat approve" | cond6_outcome_dv=="Somewhat approve" | cond9_outcome_dv=="Somewhat approve" | cond10_outcome_dv=="Somewhat approve" | cond13_outcome_dv=="Somewhat approve" | cond14_outcome_dv=="Somewhat approve" 
replace disapproval2 = 4 if cond1_outcome_dv=="Neither approve nor disapprove" | cond2_outcome_dv=="Neither approve nor disapprove" | cond5_outcome_dv=="Neither approve nor disapprove" | cond6_outcome_dv=="Neither approve nor disapprove" | cond9_outcome_dv=="Neither approve nor disapprove" | cond10_outcome_dv=="Neither approve nor disapprove" | cond13_outcome_dv=="Neither approve nor disapprove" | cond14_outcome_dv=="Neither approve nor disapprove" 
replace disapproval2 = 5 if cond1_outcome_dv=="Somewhat disapprove" | cond2_outcome_dv=="Somewhat disapprove" | cond5_outcome_dv=="Somewhat disapprove" | cond6_outcome_dv=="Somewhat disapprove" | cond9_outcome_dv=="Somewhat disapprove" | cond10_outcome_dv=="Somewhat disapprove" | cond13_outcome_dv=="Somewhat disapprove" | cond14_outcome_dv=="Somewhat disapprove" 
replace disapproval2 = 6 if cond1_outcome_dv=="Disapprove" | cond2_outcome_dv=="Disapprove" | cond5_outcome_dv=="Disapprove" | cond6_outcome_dv=="Disapprove" | cond9_outcome_dv=="Disapprove" | cond10_outcome_dv=="Disapprove" | cond13_outcome_dv=="Disapprove" | cond14_outcome_dv=="Disapprove" 
replace disapproval2 = 7 if cond1_outcome_dv=="Strongly disapprove" | cond2_outcome_dv=="Strongly disapprove" | cond5_outcome_dv=="Strongly disapprove" | cond6_outcome_dv=="Strongly disapprove" | cond9_outcome_dv=="Strongly disapprove" | cond10_outcome_dv=="Strongly disapprove" | cond13_outcome_dv=="Strongly disapprove" | cond14_outcome_dv=="Strongly disapprove" 


***Code Binart Disapproval Variable 2 (1 = Disapprove; 0 = Don't Disapprove)
gen disapproval2_binary = 0
replace disapproval2_binary = 1 if disapproval2>=5
replace disapproval2_binary = . if disapproval2==.


***Code Mechanisms 

*Best Strategy
gen beststrategy1 = .
replace beststrategy1 = 7 if strategy1=="Strongly agree" 
replace beststrategy1 = 6 if strategy1=="Agree" 
replace beststrategy1 = 5 if strategy1=="Somewhat agree"
replace beststrategy1 = 4 if strategy1=="Neither agree nor disagree"
replace beststrategy1 = 3 if strategy1=="Somewhat disagree" 
replace beststrategy1 = 2 if strategy1=="Disagree" 
replace beststrategy1 = 1 if strategy1=="Strongly disagree" 

gen beststrategy1_binary = 0
replace beststrategy1_binary = 1 if beststrategy1>=5
replace beststrategy1_binary = . if beststrategy1==.

gen beststrategy2 = .
replace beststrategy2 = 7 if strategy2=="Strongly agree" 
replace beststrategy2 = 6 if strategy2=="Agree" 
replace beststrategy2 = 5 if strategy2=="Somewhat agree"
replace beststrategy2 = 4 if strategy2=="Neither agree nor disagree"
replace beststrategy2 = 3 if strategy2=="Somewhat disagree" 
replace beststrategy2 = 2 if strategy2=="Disagree" 
replace beststrategy2 = 1 if strategy2=="Strongly disagree" 

gen beststrategy2_binary = 0
replace beststrategy2_binary = 1 if beststrategy2>=5
replace beststrategy2_binary = . if beststrategy2==.

*Pacifist 
rename pacifist1 pacifist1_text
rename pacifist2 pacifist2_text

gen pacifist1 = .
replace pacifist1 = 7 if pacifist1_text=="Strongly agree" 
replace pacifist1 = 6 if pacifist1_text=="Agree" 
replace pacifist1 = 5 if pacifist1_text=="Somewhat agree"
replace pacifist1 = 4 if pacifist1_text=="Neither agree nor disagree"
replace pacifist1 = 3 if pacifist1_text=="Somewhat disagree" 
replace pacifist1 = 2 if pacifist1_text=="Disagree" 
replace pacifist1 = 1 if pacifist1_text=="Strongly disagree" 

gen pacifist1_binary = 0
replace pacifist1_binary = 1 if pacifist1>=5
replace pacifist1_binary = . if pacifist1==.

gen pacifist2 = .
replace pacifist2 = 7 if pacifist2_text=="Strongly agree" 
replace pacifist2 = 6 if pacifist2_text=="Agree" 
replace pacifist2 = 5 if pacifist2_text=="Somewhat agree"
replace pacifist2 = 4 if pacifist2_text=="Neither agree nor disagree"
replace pacifist2 = 3 if pacifist2_text=="Somewhat disagree" 
replace pacifist2 = 2 if pacifist2_text=="Disagree" 
replace pacifist2 = 1 if pacifist2_text=="Strongly disagree" 

gen pacifist2_binary = 0
replace pacifist2_binary = 1 if pacifist2>=5
replace pacifist2_binary = . if pacifist2==.

*Warmonger 
rename warmonger1 warmonger1_text
rename warmonger2 warmonger2_text

gen warmonger1 = .
replace warmonger1 = 7 if warmonger1_text=="Strongly agree" 
replace warmonger1 = 6 if warmonger1_text=="Agree" 
replace warmonger1 = 5 if warmonger1_text=="Somewhat agree"
replace warmonger1 = 4 if warmonger1_text=="Neither agree nor disagree"
replace warmonger1 = 3 if warmonger1_text=="Somewhat disagree" 
replace warmonger1 = 2 if warmonger1_text=="Disagree" 
replace warmonger1 = 1 if warmonger1_text=="Strongly disagree" 

gen warmonger1_binary = 0
replace warmonger1_binary = 1 if warmonger1>=5
replace warmonger1_binary = . if warmonger1==.

gen warmonger2 = .
replace warmonger2 = 7 if warmonger2_text=="Strongly agree" 
replace warmonger2 = 6 if warmonger2_text=="Agree" 
replace warmonger2 = 5 if warmonger2_text=="Somewhat agree"
replace warmonger2 = 4 if warmonger2_text=="Neither agree nor disagree"
replace warmonger2 = 3 if warmonger2_text=="Somewhat disagree" 
replace warmonger2 = 2 if warmonger2_text=="Disagree" 
replace warmonger2 = 1 if warmonger2_text=="Strongly disagree" 

gen warmonger2_binary = 0
replace warmonger2_binary = 1 if warmonger2>=5
replace warmonger2_binary = . if warmonger2==.

*Moderate
gen moderate = 0
replace moderate = 1 if warmonger1<4 & pacifist1<4
replace moderate = . if warmonger1==. | pacifist1==.

*Competent 
rename competent1 competent1_text

gen competent1 = .
replace competent1 = 7 if competent1_text=="Strongly agree" 
replace competent1 = 6 if competent1_text=="Agree" 
replace competent1 = 5 if competent1_text=="Somewhat agree"
replace competent1 = 4 if competent1_text=="Neither agree nor disagree"
replace competent1 = 3 if competent1_text=="Somewhat disagree" 
replace competent1 = 2 if competent1_text=="Disagree" 
replace competent1 = 1 if competent1_text=="Strongly disagree" 

gen competent1_binary = 0
replace competent1_binary = 1 if competent1>=5
replace competent1_binary = . if competent1==.

*Tough 
rename tough1 tough1_text

gen tough1 = .
replace tough1 = 7 if tough1_text=="Strongly agree" 
replace tough1 = 6 if tough1_text=="Agree" 
replace tough1 = 5 if tough1_text=="Somewhat agree"
replace tough1 = 4 if tough1_text=="Neither agree nor disagree"
replace tough1 = 3 if tough1_text=="Somewhat disagree" 
replace tough1 = 2 if tough1_text=="Disagree" 
replace tough1 = 1 if tough1_text=="Strongly disagree" 

gen tough1_binary = 0
replace tough1_binary = 1 if tough1>=5
replace tough1_binary = . if tough1==.

*Trustworthy 
rename trustworthy1 trustworthy1_text

gen trustworthy1 = .
replace trustworthy1 = 7 if trustworthy1_text=="Strongly agree" 
replace trustworthy1 = 6 if trustworthy1_text=="Agree" 
replace trustworthy1 = 5 if trustworthy1_text=="Somewhat agree"
replace trustworthy1 = 4 if trustworthy1_text=="Neither agree nor disagree"
replace trustworthy1 = 3 if trustworthy1_text=="Somewhat disagree" 
replace trustworthy1 = 2 if trustworthy1_text=="Disagree" 
replace trustworthy1 = 1 if trustworthy1_text=="Strongly disagree" 

gen trustworthy1_binary = 0
replace trustworthy1_binary = 1 if trustworthy1>=5
replace trustworthy1_binary = . if trustworthy1==.


***Confounding Placebo (1 = Perceived President Non-White; 1 = White)
gen nonwhite_placebo = 0
replace nonwhite_placebo = 1 if race!="Caucasian/White"
replace nonwhite_placebo = . if race==""


***FP Orientation Placebo
gen dove_placebo = .
replace dove_placebo = 0 if hawkdove=="Usually favors military solutions over diplomatic ones"
replace dove_placebo = 0 if hawkdove=="Other"
replace dove_placebo = 1 if hawkdove=="Usually favors diplomatic solutions over military ones"



***Manipulation Checks (1 = Passed; 0 = Failed)

*Name Check
gen name_manipcheck = 0
replace name_manipcheck = 1 if male==1 & male_name=="Eric" & name=="Eric"
replace name_manipcheck = 1 if male==1 & male_name=="Steven" & name=="Steven"
replace name_manipcheck = 1 if female==1 & female_name=="Erica" & name=="Erica"
replace name_manipcheck = 1 if female==1 & female_name=="Stephanie" & name=="Stephanie"

*Policy Check
gen policy_manipcheck = 0
replace policy_manipcheck = 1 if statusquo==1 & action=="Maintained the U.S. military  presence in the Arctic"
replace policy_manipcheck = 1 if conciliatory==1 & action=="Decreased the U.S. military presence in the Arctic"

*Implied Gender Manip Check (i.e., got gender of leader right)
gen implied_gender_manipcheck = 0
replace implied_gender_manipcheck = 1 if (male==1) & (name=="Eric" | name=="Steven")
replace implied_gender_manipcheck = 1 if (female==1) & (name=="Erica" | name=="Stephanie")

*Got All Manipulation Checks Correct
gen all_manipcheck = 0
replace all_manipcheck = 1 if name_manipcheck==1 & policy_manipcheck==1
